<%@ include file="/view/template/header.jsp"%>
<div id="content">
<%@ include file="/view/ehr/ehr_common.jsp"%>
	<div class="right-content">
		<div class="box">
			<s:if test='replyMessage.message!="empty"'>
				<h3><s:property value="replyMessage.message"/></h3>
			</s:if>
			<s:form action="admit_patient_form">
				<div id="tabs">
					<ul>
						<li><a href="#tabs-1"><s:text name="label.admit.admission_information"/></a>
						</li>
						<li><a href="#tabs-2"><s:text name="label.admit.guardian_information"/></a>
						</li>
					</ul>
					<div id="tabs-1">
						<div class="sub_box">
							<div class="con-part">
								<span><s:label key="label.admit.patient_id" required="true"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:if test="#parameters['patient_id'][0]!=0">
									<s:textfield key="admit.patient_id" value="%{#parameters['patient_id'][0]}" required="true" cssErrorClass="error" />
								</s:if>
								<s:else>
									<s:textfield key="admit.patient_id" value="%{admit.patient_id}" required="true" cssErrorClass="error" />
								</s:else>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.patient_id'}"/></s:fielderror>
							</div> 
							<div class="con-part">
								<span><s:label key="label.admit.admiting_officer" required="true" ></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield key="admit.admiting_officer" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.admiting_officer'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.bed" required="true"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:if test="#parameters['bed_no'][0]!=0">
									<s:textfield key="admit.bed" value="%{#parameters['bed_no'][0]}" required="true" cssErrorClass="error"/>
								</s:if>
								<s:else>
									<s:textfield key="admit.bed" value="%{admit.bed}" required="true" cssErrorClass="error"/>
								</s:else>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.bed'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.ward"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:if test="#parameters['ward_no'][0]!=0">
									<s:textfield key="admit.ward" value="%{#parameters['ward_no'][0]}" required="true" cssErrorClass="error"/>
								</s:if>
								<s:else>
									<s:textfield key="admit.ward" value="%{admit.ward}" required="true" cssErrorClass="error"/>
								</s:else>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.ward'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.admit_reason"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textarea key="admit.admit_reason" required="true" cssErrorClass="error" cssClass="textareaStyle"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.admit_reason'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.consultant_id"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield key="admit.consultant_id" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.consultant_id'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.admission_date"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield name="admit.admission_date" id="datetimepicker" class="input-text" cssErrorClass="error"></s:textfield>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.admission_date'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.diagnosis"></s:label></span>
								<s:textarea key="admit.diagnosis" required="true" cssErrorClass="error" cssClass="textareaStyle"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.diagnosis'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.observation"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textarea key="admit.observation" required="true" cssErrorClass="error" cssClass="textareaStyle"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.observation'}"/></s:fielderror>
							</div>
						</div>
					</div>	
					<div id="tabs-2">
						<div class="sub_box">
							<div class="con-part">
								<span><s:label key="label.admit.guardian.prefix"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:select key="admit.guardian.prefix" list="#{'Rev.': 'Rev.', 'Dr.': 'Dr.', 'Mr.': 'Mr.', 'Mrs.': 'Mrs.', 'Miss.': 'Miss.'}" headerKey="0" headerValue="---Select Prefix---" cssErrorClass="error" required="true"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.prefix'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.given_name"></s:label></span>
								<s:textfield key="admit.guardian.given_name" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.given_name'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.furthur_names"></s:label></span>
								<s:textfield key="admit.guardian.furthur_names" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.furthur_names'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.surname"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield key="admit.guardian.surname" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.surname'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.nic_no"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield key="admit.guardian.nic_no" required="true"cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.nic_no'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.guardian_relationship"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:select key="admit.guardian.guardian_relationship" list="#{'Mother':'Mother', 'Father':'Father' , 'Sister':'Sister', 'Brother':'Brother', 'Grand Mother':'Grand Mother', 'Grand Father':'Grand Father', 'SPOUSE':'SPOUSE', 'Aunt':'Aunt', 'Uncle':'Uncle', 'Other':'Other'}" headerKey="0" headerValue="--Select Relationship--"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.guardian_relationship'}"/></s:fielderror>
							</div>
							<div class="clear"></div>
							<h1><s:text name="label.admit.guardian_contact_details_address"/></h1>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.addresses.house_number"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield key="admit.guardian.addresses.house_number" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.addresses.house_number'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.addresses.street"></s:label></span>
								<s:textfield key="admit.guardian.addresses.street" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.addresses.street'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.addresses.city_1"></s:label><img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /></span>
								<s:textfield key="admit.guardian.addresses.city_1" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.addresses.city_1'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.addresses.city_2"></s:label></span>
								<s:textfield key="admit.guardian.addresses.city_2" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.addresses.city_2'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.addresses.country"></s:label></span>
								<s:textfield key="admit.guardian.addresses.country" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.addresses.country'}"/></s:fielderror>
							</div>
							<div class="clear"></div>
							<h1><s:text name="label.admit.guardian_contact_details_other"/></h1>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.telephoneNumbers"></s:label></span>
								<s:textfield key="admit.guardian.telephoneNumbers" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.telephoneNumbers'}"/></s:fielderror>
							</div>
							<div class="con-part">
								<span><s:label key="label.admit.guardian.email"></s:label></span>
								<s:textfield key="admit.guardian.email" required="true" cssErrorClass="error"/>
								<s:fielderror cssStyle="errorMessage"><s:param value="%{'admit.guardian.email'}"/></s:fielderror>
							</div>
						</div>
					</div>
					<div class="button_bar2">
						<s:submit key="label.admit.submit" cssClass="green"/>	
					</div>
				</div>
			</s:form>
		</div>
	</div>
</div>
<script type="text/javascript" src="<% out.print(baseURL);%>/view/template/js/jquery-ui-timepicker-addon.js"></script>
<script>
$(function() {
	$("#tabs").tabs();
});
$(function() {
	$('#datetimepicker').datetimepicker();
});
</script>
<%@ include file="/view/template/footer.jsp"%>